<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>会员激活 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .input-field {
      width: 100%;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 12px 16px;
      font-size: 14px;
    }
    
    .input-field:focus {
      outline: none;
      border-color: var(--primary);
    }
    
    .form-group {
      margin-bottom: 16px;
    }
    
    .form-label {
      display: block;
      margin-bottom: 8px;
      font-size: 14px;
      color: var(--text-sub);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="member_center.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">会员激活</h1>
    </div>
    
    <!-- 激活方式选择 -->
    <div class="flex border-b border-gray-100">
      <div class="flex-1 text-center py-3 tab-active" id="tab-code">
        激活码激活
      </div>
      <div class="flex-1 text-center py-3 text-gray-500" id="tab-card">
        会员卡激活
      </div>
      <div class="flex-1 text-center py-3 text-gray-500" id="tab-purchase">
        购买会员
      </div>
    </div>
    
    <!-- 激活码激活 -->
    <div class="p-4" id="content-code">
      <div class="bg-primary-light p-4 rounded-lg mb-4">
        <div class="flex items-center">
          <i class="fas fa-info-circle primary-color mr-2"></i>
          <p class="text-sm text-gray-700">请输入您获得的会员激活码，激活后即可享受会员权益</p>
        </div>
      </div>
      
      <div class="form-group">
        <label class="form-label">激活码</label>
        <input type="text" class="input-field" placeholder="请输入16位激活码" maxlength="16">
      </div>
      
      <div class="form-group">
        <label class="form-label">手机号</label>
        <input type="tel" class="input-field" placeholder="请输入手机号码" maxlength="11">
      </div>
      
      <div class="form-group">
        <label class="form-label">验证码</label>
        <div class="flex">
          <input type="text" class="input-field flex-1" placeholder="请输入验证码" maxlength="6">
          <button class="ml-2 px-4 py-2 btn-outline rounded-lg whitespace-nowrap">获取验证码</button>
        </div>
      </div>
      
      <button class="btn-primary w-full py-3 rounded-lg mt-4">立即激活</button>
      
      <div class="mt-4">
        <h3 class="text-base font-medium mb-2">激活说明</h3>
        <ul class="text-sm text-gray-600 list-disc pl-5 space-y-1">
          <li>激活码为16位字母和数字组合，区分大小写</li>
          <li>每个激活码仅可使用一次</li>
          <li>激活成功后，会员有效期将根据激活码类型自动计算</li>
          <li>如激活过程中遇到问题，请联系客服 400-888-8888</li>
        </ul>
      </div>
    </div>
    
    <!-- 会员卡激活 -->
    <div class="p-4 hidden" id="content-card">
      <div class="bg-primary-light p-4 rounded-lg mb-4">
        <div class="flex items-center">
          <i class="fas fa-info-circle primary-color mr-2"></i>
          <p class="text-sm text-gray-700">请输入您的实体会员卡背面的卡号和密码进行激活</p>
        </div>
      </div>
      
      <div class="form-group">
        <label class="form-label">会员卡号</label>
        <input type="text" class="input-field" placeholder="请输入会员卡号" maxlength="16">
      </div>
      
      <div class="form-group">
        <label class="form-label">密码</label>
        <input type="password" class="input-field" placeholder="请输入密码" maxlength="8">
      </div>
      
      <div class="form-group">
        <label class="form-label">手机号</label>
        <input type="tel" class="input-field" placeholder="请输入手机号码" maxlength="11">
      </div>
      
      <div class="form-group">
        <label class="form-label">验证码</label>
        <div class="flex">
          <input type="text" class="input-field flex-1" placeholder="请输入验证码" maxlength="6">
          <button class="ml-2 px-4 py-2 btn-outline rounded-lg whitespace-nowrap">获取验证码</button>
        </div>
      </div>
      
      <button class="btn-primary w-full py-3 rounded-lg mt-4">立即激活</button>
      
      <div class="mt-4">
        <h3 class="text-base font-medium mb-2">激活说明</h3>
        <ul class="text-sm text-gray-600 list-disc pl-5 space-y-1">
          <li>会员卡号和密码可在实体会员卡背面获取</li>
          <li>每张会员卡仅可绑定一个账号</li>
          <li>激活成功后，会员有效期将根据卡片类型自动计算</li>
          <li>如激活过程中遇到问题，请联系客服 400-888-8888</li>
        </ul>
      </div>
    </div>
    
    <!-- 购买会员 -->
    <div class="p-4 hidden" id="content-purchase">
      <div class="bg-primary-light p-4 rounded-lg mb-4">
        <div class="flex items-center">
          <i class="fas fa-info-circle primary-color mr-2"></i>
          <p class="text-sm text-gray-700">选择适合您的会员套餐，立即开通尊享服务</p>
        </div>
      </div>
      
      <div class="space-y-3 mb-4">
        <div class="border border-gray-200 rounded-lg p-3 relative">
          <input type="radio" name="membership" id="monthly" class="absolute top-4 left-4">
          <div class="ml-8">
            <h3 class="font-medium">月度会员</h3>
            <div class="flex items-center mt-1">
              <span class="text-lg primary-color font-bold">¥39.9</span>
              <span class="text-xs text-gray-500 ml-2 line-through">¥49.9</span>
              <span class="text-xs bg-primary-light primary-color px-2 py-0.5 rounded ml-2">8折优惠</span>
            </div>
            <p class="text-xs text-gray-500 mt-1">有效期30天，享受全部会员权益</p>
          </div>
        </div>
        
        <div class="border border-primary rounded-lg p-3 relative">
          <input type="radio" name="membership" id="yearly" checked class="absolute top-4 left-4">
          <div class="ml-8">
            <div class="flex items-center">
              <h3 class="font-medium">年度会员</h3>
              <span class="text-xs bg-primary primary-color bg-opacity-10 px-2 py-0.5 rounded ml-2">推荐</span>
            </div>
            <div class="flex items-center mt-1">
              <span class="text-lg primary-color font-bold">¥299</span>
              <span class="text-xs text-gray-500 ml-2 line-through">¥478.8</span>
              <span class="text-xs bg-primary-light primary-color px-2 py-0.5 rounded ml-2">6.2折优惠</span>
            </div>
            <p class="text-xs text-gray-500 mt-1">有效期365天，享受全部会员权益，额外赠送3次服务</p>
          </div>
        </div>
        
        <div class="border border-gray-200 rounded-lg p-3 relative">
          <input type="radio" name="membership" id="lifetime" class="absolute top-4 left-4">
          <div class="ml-8">
            <h3 class="font-medium">终身会员</h3>
            <div class="flex items-center mt-1">
              <span class="text-lg primary-color font-bold">¥998</span>
              <span class="text-xs text-gray-500 ml-2 line-through">¥1998</span>
              <span class="text-xs bg-primary-light primary-color px-2 py-0.5 rounded ml-2">5折特惠</span>
            </div>
            <p class="text-xs text-gray-500 mt-1">永久有效，尊享全部会员权益，每年额外赠送5次服务</p>
          </div>
        </div>
      </div>
      
      <div class="form-group">
        <label class="form-label">手机号</label>
        <input type="tel" class="input-field" placeholder="请输入手机号码" maxlength="11">
      </div>
      
      <div class="form-group">
        <label class="form-label">验证码</label>
        <div class="flex">
          <input type="text" class="input-field flex-1" placeholder="请输入验证码" maxlength="6">
          <button class="ml-2 px-4 py-2 btn-outline rounded-lg whitespace-nowrap">获取验证码</button>
        </div>
      </div>
      
      <div class="flex items-center mb-4">
        <input type="checkbox" id="agree" checked>
        <label for="agree" class="text-sm text-gray-600 ml-2">我已阅读并同意<a href="#" class="primary-color">《会员服务协议》</a></label>
      </div>
      
      <button class="btn-primary w-full py-3 rounded-lg">立即支付 ¥299</button>
    </div>
    
    <!-- 激活成功弹窗 -->
    <div class="fixed inset-0 bg-black bg-opacity-50 hidden flex items-center justify-center z-20" id="successModal">
      <div class="bg-white rounded-lg w-80 overflow-hidden">
        <div class="p-6 flex flex-col items-center">
          <div class="w-16 h-16 rounded-full bg-primary-light flex items-center justify-center mb-4">
            <i class="fas fa-check-circle text-3xl primary-color"></i>
          </div>
          <h3 class="text-lg font-medium mb-2">激活成功</h3>
          <p class="text-sm text-gray-500 text-center mb-4">恭喜您成功激活会员，即刻开始享受专属权益</p>
          <button class="btn-primary w-full py-3 rounded-lg" onclick="window.location.href='member_center.html'">返回会员中心</button>
        </div>
      </div>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 标签页切换
      const tabs = [
        document.getElementById('tab-code'),
        document.getElementById('tab-card'),
        document.getElementById('tab-purchase')
      ];
      
      const contents = [
        document.getElementById('content-code'),
        document.getElementById('content-card'),
        document.getElementById('content-purchase')
      ];
      
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', function() {
          // 更新标签样式
          tabs.forEach(t => {
            t.classList.remove('tab-active');
            t.classList.add('text-gray-500');
          });
          this.classList.add('tab-active');
          this.classList.remove('text-gray-500');
          
          // 显示对应内容
          contents.forEach(content => content.classList.add('hidden'));
          contents[index].classList.remove('hidden');
        });
      });
      
      // 激活按钮点击事件
      const activateButtons = document.querySelectorAll('.btn-primary.w-full.py-3.rounded-lg');
      activateButtons.forEach(button => {
        if (button.textContent === '立即激活') {
          button.addEventListener('click', function() {
            document.getElementById('successModal').classList.remove('hidden');
            document.getElementById('successModal').classList.add('flex');
          });
        }
      });
    });
  </script>
</body>
</html> 